<?php

namespace App\Kuafu\Shop\Resources\merchant;

use App\Http\Resources\BaseResource;
use App\Kuafu\Common\Service\CommonService;
use App\Kuafu\Shop\Enum\CodeEnum as ShopEnum;

class CityShopListResource extends BaseResource
{
    public static array $collectShopIds = [];

    public function toArray($request): array
    {
        return [
            'id'       => (string)$this->id,
            'shopCode' => CommonService::zeroFill($this->shopCode),
            'name'     => str_replace(["夸父炸串", "(", ")", "（", "）"], "", $this->name),
            "lng"      => $this->lng,
            "lat"      => $this->lat,
            'address'  => $this->address,
            'prepare'  => (int)($this->status == ShopEnum::SHOP_STATUS_PREPARE),
        ]; // TODO: Change the autogenerated stub
    }
}
